import request from '../utils/request'

//上传图片视频存储地址
export const UploadURL = "http://39.98.173.131:8080/resources/"

//获取当前登录人
export const GetLoginPerson = () => {
    return request(`/api/my_employee_management`)
}

//新建HSE审核组
export const CreateHSEAuditGroup = (data) => {
    return request(`/api/hse/addHSEAuditGroup`, {
        method: 'post',
        data
    })
}

//获取HSE审核组
export const GetHSEAuditGroup = (params) => {
    return request(`/api/hse/queryHSEAuditGroup`, {
        params
    })
}

//获取HSE任务ID
export const GetHSEAuditTaskData = (params) => {
    return request(`/api/hse/queryHseAuditTask`, {
        params
    })
}

//获取HSE审核成员
export const GetHSEAuditGroupMember = () => {
    return request(`/api/employees`)
}

//获取HSE审核组长
export const GetHSEAuditGroupLeader = (params) => {
    return request('/api/hsecheckRecord/queryHeadman',{
        params
    })
}

//获取HSE审核组成员
export const GetHSEGroupMembers = (params) => {
    return request('/api/hsecheckRecord/queryMember', {
        params
    })
}

//修改审核区域
export const UpdateHSEAuditGroupCompany = (data) => {
    return request(`/api/hse/updateHseAuditGroupMember`, {
        method: 'put',
        data
    })
}

//查询审核组组员信息
export const GetHSEAuditGroupData = (params) => {
    return request(`/api/hse/queryAllGroupMembersByYearRound`, {
        params
    })
}

//获取HSE审核主题
export const GetHSEAuditGroupTopic = (params) => {
    return request(`/api/hse/queryHseAuditTopic`,{
        params
    })
}

//修改HSE审核主题
export const UpdateHSEAuditTopic = (data) => {
    return request(`/api/hse/updateHseAuditGroupMemberTopic`, {
        method: 'put',
        data
    })
}

//查询HSE审核任务
export const GetHseAuditTask = (params) => {
    return request(`/api/hse/queryTaskAndGroupByStaffID`, {
        params
    })
}

//查询HSE审核主题审核项
export const GetHseAuditTopicItem = (hseTopicCode) => {
    return request(`/api/hse/queryHseAuditSystemCheckItems/${hseTopicCode}`)
}

//查询HSE审核体系
export const GetHSEAuditSystem = (code, params) => {
    return request(`/api/hse/queryHseAuditSystemByCode/${code}`,{
        params  
    })
}

//添加检查问题
export const AddHSECheckRecord = (data) => {
    return request(`/api/hse/addCheckRecord`,{
        method: 'post',
        data
    })
}

//查询检查问题（验证）
export const GetHSEAuditProblem = (params) => {
    return request(`/api/hse/queryQhseeCheckRecord`,{
        params
    })
}

//删除审核组
export const DeleteAuditGroup = (params) => {
    return request(`/api/hse/deleteHSEAuditGroup `,{
        method: 'delete',
        params
    })
}

//获取录入问题记录
export const GetAuditSubjectRecord  = (params) => {
    return request(`/api/hse/queryAuditSubjectRecord`, {
        params
    })  
}

//修改录入问题
export const UpdateHSECheckRecord = (data) => {
    return request(`/api/hse/updateCheckRecord`, {
        method: 'put',
        data
    })
}

//删除录入问题
export const DeleteCheckRecord = (data) => {
    return request(`/api/hse/deleteCheckRecord`, {
        method: 'delete',
        data
    })
}

//获取审核人信息
export const GetHSEAllCheckPerson = (params) => {
    return request(`/api/hsecheckRecord/queryAllCheckPerson`, {
        params
    })
}

//获取用户已录入的问题
export const GetHSEEntriedList = (params) => {
    return request('/api/hse/queryAuditSubjectRecordByStatus', {
        params
    })
}

//批量删除
export const DeleteHSEEntried = (data) => {
    return request('/api/hse/deleteQHSEECheckRecord', {
        method: 'post',
        data
    })
}

//批量提交
export const SubmitHSEEntried = (params) => {
    return request('/api/hse/updateCheckRecordStatus', {
        method: 'put',
        params
    })
}

//查询问题数量
export const GetHSEProblemNum = (params) => {
    return request('/api/hse/queryQHSEECheckRecordNums', {
        params
    })
}
